Information processing apparatus and control method

ABSTRACT

An information processing apparatus capable of communicating using a first communication method and communicating using a second communication method performs, in a case where attempting processing fails to establish a connection with a communication apparatus using the first communication method without using an external apparatus, communication with the communication apparatus by the second communication method and transmits a job to the communication apparatus via the connection with the communication apparatus using the first communication method, the communication being used to establish the connection with the communication apparatus using the first communication method.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an information processing apparatus anda control method.

Description of the Related Art

A method called handover has been known as a method by which aninformation processing apparatus such as a smartphone transmits a job toa communication apparatus such as a network-capable printer. A handoverrefers to, for example, a method by which the information processingapparatus performs communication, which is used for establishment of aconnection with the communication apparatus using a first communicationmethod, with the communication apparatus by a second communicationmethod, and then transmits a job to the communication apparatus via theconnection with the communication apparatus using the firstcommunication method. Japanese Patent Application Laid-Open No.2017-184170 discusses a configuration for communicating a job byhandover.

A demand for more adaptable job communication control is increasing morethan ever as configurations capable of handover-based job communicationbecome widespread.

The present invention is directed to controlling job communication moreappropriately in a configuration where a job can be communicated byhandover.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, a control method of aninformation processing apparatus capable of communicating using a firstcommunication method and communicating using a second communicationmethod includes accepting a communication instruction for predetermineddata from a user, after the communication instruction is accepted,performing attempting processing for attempting to establish aconnection with a communication apparatus using the first communicationmethod, in a case where the attempting processing successfullyestablishes the connection with the communication apparatus using thefirst communication method, communicating the predetermined data withthe communication apparatus via a connection with the communicationapparatus using the first communication method without communicationwith the communication apparatus by the second communication method, thecommunication being used to establish the connection with thecommunication apparatus using the first communication method, and in acase where the attempting processing fails to establish the connectionwith the communication apparatus using the first communication method,performing the communication with the communication apparatus by thesecond communication method and communicating the predetermined datawith the communication apparatus via the connection with thecommunication apparatus using the first communication method, thecommunication being used to establish the connection with thecommunication apparatus using the first communication method.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating a configuration example of aninformation processing apparatus and a communication apparatus accordingto an exemplary embodiment of the present invention.

FIG. 2 is a diagram illustrating processing for broadcasting advertisinginformation and receiving a Bluetooth® Low Energy connection request.

FIG. 3 is a diagram illustrating Bluetooth® Low Energy advertising.

FIG. 4 is a diagram illustrating a structure of the advertisinginformation.

FIG. 5 is a diagram including flowcharts of FIGS. 5A and 5B illustratinga procedure of registration processing performed by the informationprocessing apparatus.

FIG. 6 is a flowchart illustrating a procedure of registrationprocessing performed by the communication apparatus.

FIG. 7 is a flowchart illustrating a procedure of transmissionprocessing performed by the information processing apparatus.

FIG. 8 is a flowchart illustrating a procedure of transmissionprocessing performed by the communication apparatus.

FIG. 9 is a diagram illustrating a screen for selecting image data to beprinted.

FIG. 10 is a diagram illustrating a screen displayed after the selectionof the image data to be printed.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the present invention will be described belowwith reference to the drawings. It should be understood thatmodifications and improvements made to the following exemplaryembodiments based on ordinary knowledge of those skilled in the artwithout departing from the gist of the present invention are alsoembraced within the scope of the present invention.

An information processing apparatus and a communication apparatusincluded in a communication system according to an exemplary embodimentwill be described. While the present exemplary embodiment will bedescribed using a smartphone as an example of the information processingapparatus, this is not restrictive. Various apparatuses such as a mobileterminal, a notebook personal computer (PC), a tablet terminal, apersonal digital assistant (PDA), and a digital camera can be alsoapplied. While the present exemplary embodiment will be described usinga printer as an example of the communication apparatus, this is notrestrictive. Various apparatuses that can communicate wirelessly withthe information processing apparatus can be applied. Examples ofprinters include an inkjet printer, a full-color laser beam printer, anda monochrome printer. Examples other than printers include a copyingmachine, a facsimile apparatus, a mobile terminal, a smartphone, anotebook PC, a tablet terminal, a PDA, a digital camera, a music playerdevice, a television set, and a smart speaker. Other examples include amultifunction peripheral having a plurality of functions such as a copyfunction, a facsimile (FAX) function, and a print function.

A configuration of the information processing apparatus according to thepresent exemplary embodiment and the communication apparatus capable ofcommunicating with the information processing apparatus according to thepresent exemplary embodiment will initially be described with referenceto the block diagram of FIG. 1. While the present exemplary embodimentis described using the following configuration as an example, thepresent exemplary embodiment can be applied to an apparatus that cancommunicate with a communication apparatus and is not limited to theillustrated functions in particular.

An information processing apparatus 101 is an information processingapparatus according to the present exemplary embodiment. The informationprocessing apparatus 101 includes an input interface 102, a centralprocessing unit (CPU) 103, a read-only memory (ROM) 104, a random accessmemory (RAM) 105, an external storage device 106, an output interface107, a display unit 108, a communication unit 110, and a short-rangewireless communication unit 111. A computer of the informationprocessing apparatus 101 includes the CPU 103, the ROM 104, and the RAM105.

The input interface 102 is an interface for accepting data input andoperation instructions from a user performing an operation on anoperation unit such as a keyboard 109. The operation unit may be aphysical keyboard or physical buttons. The operation unit may be asoftware keyboard or software buttons displayed on the display unit 108.Specifically, the input interface 102 may accept user's input via thedisplay unit 108.

The CPU 103 is a system control unit and controls the entire informationprocessing apparatus 101.

The ROM 104 stores fixed data such as a control program to be executedby the CPU 103, data tables, and a built-in operating system (OS)program. In the present exemplary embodiment, the control program storedin the ROM 104 performs software execution controls such as scheduling,task switching, and interrupt handling under management of the built-inOS program stored in the ROM 104.

The RAM 105 includes a static RAM (SRAM) using a backup power supply.Since the RAM 105 retains data by using a not-illustrated primarybattery for data backup, important data such as program controlvariables can be stored without volatilization. The RAM 105 includes amemory area where setting information about the information processingapparatus 101 and management data of the information processingapparatus 101 are stored. The RAM 105 is also used as a main memory anda work memory of the CPU 103.

The external storage device 106 stores an application that controls thecommunication apparatus 151 (hereinafter, referred to as a printingapplication) and a print information generation program that generatesprint information interpretable by the communication apparatus 151. Theprinting application is used to set an access point for thecommunication apparatus 151 to connect to and to cause the communicationapparatus 151 to perform printing. The printing application may havefunctions other than a print function. For example, the printingapplication may have a function of scanning a document set on thecommunication apparatus 151, a function of setting an access point forthe communication apparatus 151 to connect to, and a function ofchecking a state of the communication apparatus 151. For example, theprinting application is installed from an external server by Internetcommunication via the communication unit 110, and stored in the externalstorage device 106. The external storage device 106 also stores variousprograms including an information transmission and reception controlprogram for performing transmission and reception with the communicationapparatus 151 connected via the communication unit 110, and varioustypes of information to be used by the programs.

The output interface 107 is used to control data display andnotification of the state of the information processing apparatus 101 bythe display unit 108.

The display unit 108 includes a light-emitting diode (LED) and/or aliquid crystal display (LCD), and displays data and issues anotification of the state of the information processing apparatus 101.

The communication unit 110 communicates with apparatuses such as thecommunication apparatus 151 and the access point 131 for datacommunication. For example, the communication unit 110 can connect to anaccess point (not illustrated) in the communication apparatus 151. Theconnection of the communication unit 110 with the access point in thecommunication apparatus 151 enables mutual communication between theinformation processing apparatus 101 and the communication apparatus151. The communication unit 110 may communicate directly with thecommunication apparatus 151 by wireless communication, or communicatevia an external apparatus outside the information processing apparatus101 and the communication apparatus 151. Examples of the externalapparatus include an external access point (such as the access point131) outside the information processing apparatus 101 and outside thecommunication apparatus 151, and a non-access-point apparatus that canrelay communication. Examples of the wireless communication methodinclude Wireless Fidelity (Wi-Fi®). Among examples of the access point131 are devices such as a wireless local area network (LAN) router. Inthe present exemplary embodiment, the method by which the informationprocessing apparatus 101 and the communication apparatus 151 communicatedirectly without using an external access point will be referred to as adirect connection method. The method by which the information processingapparatus 101 and the communication apparatus 151 communicate via anexternal access point will be referred to as an infrastructureconnection method.

The short-range wireless communication unit 111 connects wirelessly toan apparatus such as the communication apparatus 151 at a short rangefor data communication. The short-range wireless communication unit 111communicates by using a communication method different from that of thecommunication unit 110. The short-range wireless communication unit 111can connect to, for example, a short-range wireless communication unit157 in the communication apparatus 151. Examples of the communicationmethod include near field communication (NFC), Bluetooth® Classic,Bluetooth® Low Energy, and Wi-Fi Aware.

In the present exemplary embodiment, the communication unit 110 isconfigured to communicate at higher speed and over a longer distancethan the short-range wireless communication unit 111. The short-rangewireless communication unit 111 is used to exchange communicationinformation for performing communication using the communication unit110 with an apparatus such as the communication apparatus 151.

The communication apparatus 151 is a communication apparatus accordingto the present exemplary embodiment. The communication apparatus 151includes a ROM 152, a RAM 153, a CPU 154, a print engine 155, acommunication unit 156, and the short-range wireless communication unit157. A computer of the communication apparatus 151 includes the ROM 152,the RAM 153, and the CPU 154.

As the access point in the communication apparatus 151, thecommunication unit 156 includes an access point for connecting to anapparatus such as the information processing apparatus 101. The accesspoint can connect to the communication unit 110 of the informationprocessing apparatus 101. If the communication unit 156 activates theaccess point, the communication apparatus 151 operates as an accesspoint. The communication unit 156 may communicate directly with theinformation processing apparatus 101 by wireless communication, orcommunicate via the access point 131. Examples of the communicationmethod include Wi-Fi®. The communication unit 156 may include hardwarefunctioning as an access point. The communication unit 156 may operateas an access point by using software for implementing the access pointfunction.

The short-range wireless communication unit 157 wirelessly connects toan apparatus such as the information processing apparatus 101 at a shortdistance. For example, the short-range wireless communication unit 157can connect to the short-range wireless communication unit 111 in theinformation processing apparatus 101. Examples of the communicationmethod include NFC, Bluetooth® Classic, Bluetooth® Low Energy, and Wi-FiAware.

In the present exemplary embodiment, the communication unit 156communicates at higher speed and over a longer distance than theshort-range wireless communication unit 157. The short-range wirelesscommunication unit 157 is used to exchange communication information forperforming communication using the communication unit 156 with anapparatus such as the information processing apparatus 101.

The RAM 153 includes an SRAM using a backup power supply. Since the RAM153 retains data by using a not-illustrated primary battery for databackup, important data such as program control variables can be storedwithout volatilization. The RAM 153 includes a memory area where settinginformation about the communication apparatus 151 and management data ofthe communication apparatus 151 are stored. The RAM 153 is also used asa main memory and a work memory of the CPU 154. The RAM 153 functions asa reception buffer for temporarily storing print information receivedfrom the information processing apparatus 101, and stores various typesof information.

The ROM 152 stores fixed data such as a control program to be executedby the CPU 154, data tables, and a built-in OS program. In the presentexemplary embodiment, the control program stored in the ROM 152 performssoftware execution controls such as scheduling, task switching, andinterrupt handling under management of the built-in OS program stored inthe ROM 152.

The CPU 154 is a system control unit and controls the entirecommunication apparatus 151.

The print engine 155 forms an image on a recording medium such as paperby applying a recording agent such as ink onto the recording mediumbased on information stored in the RAM 153 and a print job received fromthe information processing apparatus 101, and outputs the print result.Since a print job transmitted from the information processing apparatus101 typically has a large amount of data, the print job is desirablycommunicated by using a communication method capable of high speedcommunication. The communication apparatus 151 therefore receives theprint job via the communication unit 156 that can communicate at higherspeed than the short-range wireless communication unit 157.

A memory such as an external hard disk drive (HDD) and a Secure Digital(SD) card may be attached to the communication apparatus 151 as anoptional device. The information to be stored in the communicationapparatus 151 may be stored in the memory.

The communication apparatus 151 according to the present exemplaryembodiment can operate in an infrastructure mode and a peer-to-peer(P2P) mode as modes where communication is performed by using thecommunication unit 156. In the present exemplary embodiment, thecommunication units 110 and 156 communicate via a wireless LAN (Wi-Fi).

In the infrastructure mode, the communication apparatus 151 communicateswith another apparatus such as the information processing apparatus 101via an external apparatus that forms a network (for example, an externalaccess point outside the communication apparatus 151 and outside theinformation processing apparatus 101). The connection with the externalaccess point established by the communication apparatus 151 operating inthe infrastructure mode will be referred to as an infrastructureconnection. In the present exemplary embodiment, the communicationapparatus 151 operates as a slave station and the external access pointoperates as a master station in the infrastructure connection. In thepresent exemplary embodiment, a master station refers to an apparatusthat determines a communication channel or channels to be used in thenetwork to which the master station belongs. A slave station refers toan apparatus that does not determine the communication channel(s) to beused in the network to which the slave station belongs, and uses thecommunication channel(s) determined by the master station.

In the P2P mode, the communication apparatus 151 communicates directlywith another apparatus such as the information processing apparatus 101without using an external apparatus forming a network. In the presentexemplary embodiment, the P2P mode includes access point (AP) mode 1where the communication apparatus 151 operates as a first AP, and APmode 2 where the communication apparatus 151 operates as a second AP.The first and second APs can be connected by using respective differentpieces of connection information. The P2P may also include, for example,a Wi-Fi Direct (WFD) mode where the communication apparatus 151communicates by WFD. Which of a plurality of WFD-capable devicesoperates as a master station is determined, for example, by a sequencecalled Group Owner Negotiation. Alternatively, a master station may bedetermined without Group Owner Negotiation. A WFD-capable apparatus thatplays the role of the master station will be referred to as a groupowner in particular. The connection directly established with anotherapparatus by the communication apparatus 151 operating in the P2P modewill be referred to as a direct connection. In the present exemplaryembodiment, the communication apparatus 151 operates as a master stationand the other apparatus operates as a slave station in the directconnection.

While the P2P mode in the present exemplary embodiment includes AP mode1 and AP mode 2, this is not restrictive. For example, the P2P mode mayinclude AP mode 3 where the communication apparatus 151 operates as athird AP. Yet alternatively, the P2P mode may include either one of APmodes 1 and 2. If, for example, the P2P mode includes AP mode 1 and notAP mode 2, AP mode 2 in the following description shall be rephrased asAP mode 1.

While the information processing apparatus 101 and the communicationapparatus 151 are described to share the processing in the foregoingmanner by way of example, the manner of sharing is not limited theretoand the processing may be shared differently.

In the present exemplary embodiment, the short-range wirelesscommunication units 111 and 157 communicate by Bluetooth® Low Energy. Inthe present exemplary embodiment, the short-range wireless communicationunit 157 functions as an advertiser (or slave) that broadcastsadvertising information to be described below, and the short-rangewireless communication unit 111 functions as a scanner (or master) thatreceives the advertising information.

Processing for transmitting advertising information and receiving aBluetooth® Low Energy connection request according to the Bluetooth® LowEnergy standard will be described with reference to FIG. 2. In thepresent exemplary embodiment, as described above, the short-rangewireless communication unit 157 operates as a slave device. Theprocessing mentioned above is thus performed by the short-range wirelesscommunication unit 157.

In Bluetooth® Low Energy communication, the short-range wirelesscommunication unit 157 divides the 2.4-GHz frequency band into 40channels (i.e., 0th to 39th channels of 0 ch to 39 ch) forcommunication. Among these channels, the short-range wirelesscommunication unit 157 uses the 37th to 39th channels to transmitadvertising information and receive a Bluetooth® Low Energy connectionrequest, and the 0th to 36th channels for data communication afterBluetooth® Low Energy connection. The data communication afterBluetooth® Low Energy connection is called Generic Attribute Profile(GATT) communication. The GATT refers to a profile for controllingreading and writing (transmission and reception) of information in theBluetooth® Low Energy standard. In GATT communication, the informationprocessing apparatus 101 plays a role of a GATT client and thecommunication apparatus 151 a GATT server, and the informationprocessing apparatus 101 reads and writes information from/to thecommunication apparatus 151 based on the GATT-based profile.

The vertical axis of FIG. 2 indicates the power consumption of theshort-range wireless communication unit 157, and the horizontal axisindicates time. FIG. 2 illustrates process by process the powerconsumption in transmitting advertising information by using a singlechannel. Total power consumption Tx 205 represents the total powerconsumption during transmission processing that is processing forbroadcasting advertising information. Total power consumption Rx 206represents the total power consumption during reception processing thatis processing for maintaining a receiver that receives a Bluetooth® LowEnergy request active. Transmission power 202 indicates instantaneouspower consumption in the transmission processing. Reception power 203indicates instantaneous power consumption in the reception processing.Microcomputer operating power 201 indicates instantaneous powerconsumption when a microcomputer in the short-range wirelesscommunication unit 157 is operating. The microcomputer operates evenbefore, after, and between the transmission processing and the receptionprocessing because the microcomputer is activated in advance to executeand stop the transmission processing and the reception processing. Ifadvertising information is transmitted by using a plurality of channels,the power consumption increases as much as the number of channels usedto transmit the advertising information. Sleep power 204 indicates theinstantaneous power consumption of the short-range wirelesscommunication unit 157 when the microcomputer is not operating and theshort-range wireless communication unit 157 is in a power saving state.After thus performing the transmission processing by using apredetermined channel, the short-range wireless communication unit 157waits for a Bluetooth® Low Energy connection request to be transmittedfrom the information processing apparatus 101 by performing thereception processing for a certain time, using the same channel. If theshort-range wireless communication unit 157 receives a Bluetooth® LowEnergy connection request from the information processing apparatus 101,the short-range wireless communication unit 157 establishes a Bluetooth®Low Energy connection and performs GATT communication with theinformation processing apparatus 101.

As illustrated in FIG. 3, the short-range wireless communication unit157 repeats the transmission processing and the reception processing ofthe advertising information three times channel by channel, and thenstops the operation of the microcomputer to enter the power saving statefor a certain time. The combination of the transmission processing andthe reception processing of the advertising information on apredetermined channel will be hereinafter referred to as anadvertisement. A time interval at which the advertising information istransmitted through a predetermined channel will be referred to as anadvertising interval. The number of advertisements to be repeatedbetween the initial advertisement and the power saving state can befreely changed to any numbers less than or equal to three.

FIG. 4 illustrates an example of a structure of the advertisinginformation that the short-range wireless communication unit 157broadcasts to communication apparatuses 151 nearby.

When power supply is started, the short-range wireless communicationunit 157 performs initialization processing and enters an advertisingstate. Entering the advertising state, the short-range wirelesscommunication unit 157 periodically broadcasts the advertisinginformation around based on the advertising interval. The advertisinginformation is a signal including basic header information (such asidentification information for identifying the apparatus transmittingthe advertising information), and includes a header 401 and a payload402. The information processing apparatus 101 can recognize the presenceof the communication apparatus 151 by receiving the advertisinginformation. The information processing apparatus 101 can also establisha Bluetooth® Low Energy connection with the communication apparatus 151by transmitting a Bluetooth® Low Energy connection request to thecommunication apparatus 151. The header 401 is an area storinginformation such as the type of advertising information and the size ofthe payload 402. The payload 402 stores information such as a devicename 403 serving as identification information, loaded profileinformation, connection information 404 for establishing a Bluetooth®Low Energy connection with the communication apparatus 151, and thetransmission power (Tx Power) 405 of the advertising information.Identification information 406 about the communication apparatus 151 maybe included in the advertising information. Examples of theidentification information 406 about the communication apparatus 151include a serial number of the communication apparatus 151, serviceinformation about the communication apparatus 151, a service setidentifier (SSID) of the communication apparatus 151 operating as an AP,and a password. Such information may be communicated not as advertisinginformation but by GATT communication.

In the present exemplary embodiment, the information processingapparatus 101 and the communication apparatus 151 perform pairingprocessing (authentication processing) for authentication therebetween.In the present exemplary embodiment, GATT communications include acommunication that can be performed without pairing between theinformation processing apparatus 101 and the communication apparatus151, and a communication that can only be performed with the informationprocessing apparatus 101 and the communication apparatus 151 paired.Such a configuration can prevent important information retained by thecommunication apparatus 151 from being accidentally obtained by aninformation processing apparatus 101 not yet authenticated (not havingperformed the pairing processing with the communication apparatus 151).

A method called handover, using short-range wireless communication suchas Bluetooth® Low Energy has been known as a method by which theinformation processing apparatus 101 transmits a job to thecommunication apparatus 151 by the printing application. Specifically,in a handover, the information processing apparatus 101 performscommunication for performing Wi-Fi communication with the communicationapparatus 151 by Bluetooth® Low Energy communication after a jobtransmission instruction is issued (print button is pressed). Specificexamples of the communication for performing Wi-Fi communication withthe communication apparatus 151 include reception of information(connection information) for performing Wi-Fi communication with thecommunication apparatus 151 and transmission of an instruction forshifting the communication apparatus 151 into a state capable of Wi-Ficommunication. The information processing apparatus 101 performs thecommunication for performing Wi-Fi communication with the communicationapparatus 151 as described above, and then transmits a job to thecommunication apparatus 151 by Wi-Fi communication.

A handover is effective, for example, in a case where the informationprocessing apparatus 101 retains no connection information when the jobtransmission instruction is given, or where the communication apparatus151 has activated only the Bluetooth® Low Energy function and not theWi-Fi function. However, there is an issue that performing Bluetooth®Low Energy communication and then Wi-Fi communication to transmit a jobas described above takes a long time, compared to performing only Wi-Ficommunication to transmit the job without Bluetooth® Low Energycommunication.

In other words, when job transmission is instructed by the user, whetherto perform Bluetooth® Low Energy communication before performing Wi-Ficommunication for job transmission or perform only Wi-Fi communicationfor job transmission without Bluetooth® Low Energy communication isdesired to be appropriately controlled. The present exemplary embodimentdescribes a configuration for performing such a control.

<Processing for Registering Communication Apparatus 151 Using Bluetooth®Low Energy>

In the present exemplary embodiment, to transmit a job to thecommunication apparatus 151 by the printing application, the informationprocessing apparatus 101 obtains predetermined information from thecommunication apparatus 151 and registers the communication apparatus151 in the printing application. The processing for registering thecommunication apparatus 151 in the printing application will be referredto as registration processing.

FIG. 5 is a diagram including flowcharts of FIGS. 5A and 5B illustratinga processing procedure that the information processing apparatus 101executes in the registration processing according to the presentexemplary embodiment. For example, the flowchart illustrated in FIG. 5is implemented by the CPU 103 reading the printing application stored inthe ROM 104 or the external storage device 106 into the RAM 105 andexecuting the printing application. The flowchart illustrated in FIG. 5is started in response to activation of the printing application.

In step S501, the CPU 103 displays an inquiry screen on the display unit108 to inquire of the user whether to perform the registrationprocessing.

In step S502, the CPU 103 determines whether an input to execute theregistration processing from the user is accepted. In a case where theCPU 103 determines that an input to execute the registration processingfrom the user is accepted (YES in step S502), the processing proceeds tostep S503. In a case where the CPU 103 determines that an input toexecute the registration processing from the user is not accepted (NO instep S502), the processing of the present flowchart ends, and the CPU103 displays a top screen for executing various functions of theprinting application on the display unit 108.

In step S503, which is performed in a case where the CPU 103 determinesthat an input to execute the registration processing from the user isaccepted (YES in step S502), the CPU 103 searches a Wi-Fi network towhich the information processing apparatus 101 belongs for acommunication apparatus 151 capable of communication using the printingapplication (supporting the printing application). Specifically, the CPU103 broadcasts information for requesting a response from acommunication apparatus 151 capable of communication using the printingapplication to the Wi-Fi network to which the information processingapparatus 101 belongs, and waits for a response to the information. Byreceiving a response to the information, the CPU 103 finds thecommunication apparatus 151 capable of communication using the printingapplication. For example, the response includes an Internet Protocol(IP) address, and the CPU 103 can communicate with the communicationapparatus 151 found by the search by using the IP address included inthe response. An example of the Wi-Fi network to which the informationprocessing apparatus 101 belongs is a network formed by the external APthat the information processing apparatus 101 is in Wi-Fi connectionwith. Specifically, for example, a communication apparatus 151 in Wi-Ficonnection with the external AP that the information processingapparatus 101 is in Wi-Fi connection with is searched for in the presentprocessing.

In step S504, the CPU 103 determines whether a communication apparatus151 capable of communication using the printing application is found bythe search in step S503. The determination of this determinationprocessing is equivalent to whether a communication apparatus 151capable of communication using the printing application is connected tothe external AP that the information processing apparatus 101 is inWi-Fi connection with. In a case where the CPU 103 determines that acommunication apparatus 151 capable of communication using the printingapplication is found (YES in step S504), the processing proceeds to stepS505. In a case where the CPU 103 determines that a communicationapparatus 151 capable of communication using the printing application isnot found (NO in step S504), the processing proceeds to step S507.

In step S505, which is performed in a case where the CPU 103 determinesthat a communication apparatus 151 capable of communication using theprinting application is found (YES in step S504), the CPU 103 identifiesa communication apparatus 151 to be registered in the printingapplication among communication apparatuses 151 found by the search instep S503. Specifically, for example, the CPU 103 identifies acommunication apparatus 151 transmitting the earliest response receivedby the information processing apparatus 101 among the communicationapparatuses 151 found by the search in step S503 as the communicationapparatus 151 to be registered in the printing application.

In step S506, the CPU 103 registers the communication apparatus 151identified in step S505 in the printing application. Specifically, theCPU 103 initially obtains information for registering the communicationapparatus 151 in the printing application from the communicationapparatus 151 via the infrastructure connection. Examples of theinformation for registering the communication apparatus 151 in theprinting application include information about capabilities of thecommunication apparatus 151, and the serial number and a media accesscontrol (MAC) address of the communication apparatus 151. Examples ofthe information about the capabilities of the communication apparatus151 include information about recording media that the communicationapparatus 151 can use for printing, information indicating whether thecommunication apparatus 151 can perform two-sided printing, andinformation indicating whether the communication apparatus 151 canperform color printing. The registration of the communication apparatus151 in the printing application enables a button for accepting jobtransmission instructions from the user. In other words, the informationprocessing apparatus 101 can transmit a job to the communicationapparatus 151 registered in the printing application by using theprinting application. The printing application can also display a printsetting screen based on the received information about the capabilitiesof the communication apparatus 151. The printing application cangenerate a print job based on print settings input on the print settingscreen.

In step S507, which is performed in a case where the CPU 103 determinesthat a communication apparatus 151 capable of communication using theprinting application is not found (NO in step S504), the CPU 103determines whether the Bluetooth® Low Energy function of the informationprocessing apparatus 101 is enabled. In a case where the CPU 103determines that the Bluetooth® Low Energy function of the informationprocessing apparatus 101 is enabled (YES in step S507), the processingproceeds to step S509. In a case where the CPU 103 determines whetherthe Bluetooth® Low Energy function of the information processingapparatus 101 is not enabled (NO in step S507), the processing proceedsto step S508.

In step S508, the CPU 103 performs processing for enabling theBluetooth® Low Energy function of the information processing apparatus101. Specifically, for example, the CPU 103 displays a screen forprompting the user to enable the Bluetooth® Low Energy function of theinformation processing apparatus 101 on the display unit 108.Alternatively, for example, as the processing of step S508, the CPU 103may display a system screen for enabling the Bluetooth® Low Energyfunction of the information processing apparatus 101 on the display unit108, or automatically enable the Bluetooth® Low Energy function withoutaccepting user operations. The processing then returns to step S507.

In step S509, the CPU 103 searches the vicinity of the informationprocessing apparatus 101 for a communication apparatus 151 capable ofBluetooth® Low Energy communication using the printing application.Specifically, the CPU 103 enables a function of receiving Bluetooth® LowEnergy advertising information by the short-range wireless communicationunit 157, and searches the vicinity of the information processingapparatus 101 for an apparatus transmitting advertising information.

In step S510, the CPU 103 identifies a communication apparatus 151 to beregistered in the printing application from among communicationapparatuses 151 found by the search in step S509. Specifically, forexample, the CPU 103 identifies a communication apparatus 151transmitting the earliest advertising information received by theinformation processing apparatus 101 among the communication apparatuses151 found by the search in step S509 as the communication apparatus 151to be registered in the printing application.

In step S511, the CPU 103 establishes a Bluetooth® Low Energy connectionbetween the communication apparatus 151 identified in step S510 and theinformation processing apparatus 101.

In step S512, the CPU 103 communicates various types of information withthe communication apparatus 151 identified in step S510 via theBluetooth® Low Energy connection. Specifically, the CPU 103 receivesinformation about the state of the communication apparatus 151identified in step S510, and transmits information about the name of theinformation processing apparatus 101.

In step S513, the CPU 103 determines whether a power supply state of thecommunication apparatus 151 identified in step S510 is a soft-on statebased on the information received in step S512. The soft-on state refersto a state where the components of the communication apparatus 151 forperforming various functions such as printing, scanning, and screendisplay are powered on and the communication apparatus 151 can performthe various functions. Examples of states other than the soft-on stateinclude a soft-off state. The soft-off state refers to a state wheresome of the components of the communication apparatus 151 are notpowered on, the power consumption is lower than power consumption in thesoft-on state, and the communication apparatus 151 is unable to performvarious functions such as printing, scanning, and screen display. Thepossible states of the communication apparatus 151 may also include astate where the power consumption is lower than power consumption in thesoft-on state and higher than power consumption in the soft-off state.In a case where the CPU 103 determines that a power supply state of thecommunication apparatus 151 identified in step S510 is not a soft-onstate (NO in step S513), the processing proceeds to step S514. In a casewhere the CPU 103 determines that a power supply state of thecommunication apparatus 151 identified in step S510 is a soft-on state(YES in step S513), the processing proceeds to step S515.

In step S514, which is performed in a case where the CPU 103 determinesthat a power supply state of the communication apparatus 151 identifiedin step S510 is not a soft-on state (NO in step S513), the CPU 103performs processing for changing the power supply state of thecommunication apparatus 151 identified in step S510 to the soft-onstate. Specifically, for example, the CPU 103 displays a screen forprompting the user to change the power supply state of the communicationapparatus 151 identified in step S510 to the soft-on state on thedisplay unit 108. Alternatively, for example, the CPU 103 may change thepower supply state of the communication apparatus 151 identified in stepS510 to the soft-on state by transmitting information for changing thepower supply state of the communication apparatus 151 to the soft-onstate to the communication apparatus 151 via the Bluetooth® Low Energyconnection. The processing then returns to step S513.

In step S515, which is performed in a case where the CPU 103 determinesthat a power supply state of the communication apparatus 151 identifiedin step S510 is a soft-on state (YES in step S513), the CPU 103determines whether the communication apparatus 151 identified in stepS510 is in a pairing acceptance state based on the information receivedin step S511. The pairing acceptance state refers to a state where thecommunication apparatus 151 can perform pairing processing. For example,if a predetermined pairing processing button on the communicationapparatus 151 is pressed, or if a power button of the communicationapparatus 151 is pressed in a state where initial settings of thecommunication apparatus 151 have not been made (product delivery state),the communication apparatus 151 enters the pairing acceptance state fora predetermined time. In a case where the CPU 103 determines that thecommunication apparatus 151 identified in step S510 is not in a pairingacceptance state (NO in step S515), the processing proceeds to stepS516. In a case where the CPU 103 determines that the communicationapparatus 151 identified in step S510 is in a pairing acceptance state(YES in step S515), the processing proceeds to step S517.

In step S516, which is performed in a case where the CPU 103 determinesthat the communication apparatus 151 identified in step S510 is not in apairing acceptance state (NO in step S515), the CPU 103 performsprocessing for shifting the communication apparatus 151 identified instep S510 into the pairing acceptance state. Specifically, for example,the CPU 103 displays a screen for prompting the user to shift thecommunication apparatus 151 identified in step S510 into the pairingacceptance state on the display unit 108. Alternatively, for example,the CPU 103 may shift the communication apparatus 151 identified in stepS510 into the pairing acceptance state by transmitting information forshifting the communication apparatus 151 into the pairing acceptancestate to the communication apparatus 151 via the Bluetooth® Low Energyconnection. The processing then returns to step S515.

In step S517, which is performed in a case where the CPU 103 determinesthat the communication apparatus 151 identified in step S510 is in apairing acceptance state (YES in step S515), the CPU 103 performspairing processing between the communication apparatus 151 and theinformation processing apparatus 101. The pairing processing isprocessing for enabling secure communication between the communicationapparatus 151 and the information processing apparatus 101 by thecommunication apparatus 151 and the information processing apparatus 101authenticating each other. The processing to be performed here may bepairing processing defined by the Bluetooth® Low Energy standard orpairing processing specific to the vendor of the communication apparatus151.

The pairing processing according to the present exemplary embodimentwill be described. The information processing apparatus 101 initiallyobtains information called a key seed, which is information retained bythe communication apparatus 151, from the communication apparatus 151via the Bluetooth® Low Energy connection. The information processingapparatus 101 and the communication apparatus 151 then each generate keyinformation (authentication information) from the key seed according totheir respective rules recognized in advance. The generated pieces ofkey information are stored in a storage area (for example, ROM 104) ofthe information processing apparatus 101 and a storage area (forexample, ROM 152) of the communication apparatus 151, respectively. Inother words, the information processing apparatus 101 and thecommunication apparatus 151 retain the same key information. Since thekey information is thus generated and GATT communication can beperformed using the key information, the communication apparatus 151 andthe information processing apparatus 101 are authenticated with eachother, whereby the pairing processing is completed. After the completionof the pairing processing, the information processing apparatus 101 andthe communication apparatus 151 communicate information encrypted basedon the key information. If the information processing apparatus 101 andthe communication apparatus 151 receive information encrypted based onthe key information, the information processing apparatus 101 and thecommunication apparatus 151 can recognize the unencrypted information bydecrypting the information using the key information retained by the ownapparatus. The pairing method is not limited to the foregoing. Forexample, a method using a personal identification number (PIN) code maybe used.

In step S518, the CPU 103 determines whether an automatic power-onsetting of the communication apparatus 151 identified in step S510 isenabled based on the information received in step S511. The automaticpower-on setting refers to a setting of a function for automaticallyshifting the communication apparatus 151 into the soft-on state if thecommunication apparatus 151 is in the soft-off state and wirelesscommunication is made to the communication apparatus 151. In the presentexemplary embodiment, if the automatic power-on setting is enabled, thecommunication apparatus 151 maintains the Bluetooth® Low Energycommunication function enabled even in the soft-off state. If theautomatic power-on setting is disabled, the communication apparatus 151disables the Bluetooth® Low Energy communication function in thesoft-off state. As in the processing of the present flowchart,Bluetooth® Low Energy communication is performed as appropriate afterthe registration processing of the communication apparatus 151 isperformed using Bluetooth® Low Energy. The determination is thus made toenable the Bluetooth® Low Energy function of the communication apparatus151 even when the communication apparatus 151 is in the soft-off state.In a case where the CPU 103 determines that an automatic power-onsetting of the communication apparatus 151 identified in step S510 isnot enabled (NO in step S518), the processing proceeds to step S519. Ina case where the CPU 103 determines that an automatic power-on settingof the communication apparatus 151 identified in step S510 is enabled(YES in step S518), the processing proceeds to step S520.

In step S519, which is performed in a case where the CPU 103 determinesthat an automatic power-on setting of the communication apparatus 151identified in step S510 is not enabled (NO in step S518), the CPU 103performs processing for enabling the automatic power-on setting of thecommunication apparatus 151 identified in step S510. Specifically, forexample, the CPU 103 displays a screen for prompting the user to enablethe automatic power-on setting of the communication apparatus 151identified in step S510 on the display unit 108. Alternatively, forexample, the CPU 103 may enable the automatic power-on setting of thecommunication apparatus 151 identified in step S510 by transmittinginformation for enabling the automatic power-on setting of thecommunication apparatus 151 to the communication apparatus 151 via theBluetooth® Low Energy connection. The processing then returns to stepS518.

In step S520, which is performed in a case where the CPU 103 determinesthat an automatic power-on setting of the communication apparatus 151identified in step S510 is enabled (YES in step S518), the CPU 103communicates various types of information with the communicationapparatus 151 identified in step S510 via the Bluetooth® Low Energyconnection. Specifically, the CPU 103 obtains first connectioninformation for connecting directly to the communication apparatus 151operating in AP mode 1, second connection information for connectingdirectly to the communication apparatus 151 operating in AP mode 2, andidentification information about the communication apparatus 151.Specific examples of connection information include an SSID and apassword. Examples of the identification information about thecommunication apparatus 151 include the serial number of thecommunication apparatus 151, the MAC address of the communicationapparatus 151, and a Bonjour name of the communication apparatus 151.The CPU 103 may obtain the second connection information not byBluetooth® Low Energy communication in step S520 but by Wi-Ficommunication in step S526 to be described below.

In step S521, the CPU 103 transmits an instruction to operate thecommunication apparatus 151 in AP mode 1 to the communication apparatus151 via the Bluetooth® Low Energy connection. The communicationapparatus 151 thereby starts to operate in AP mode 1. In the presentexemplary embodiment, the communication apparatus 151 uses the 2.4-GHzfrequency band for direct connection when operating in AP mode 1.However, the 5-GHZ frequency band may be used.

In step S522, the CPU 103 disconnects the Bluetooth® Low Energyconnection between the information processing apparatus 101 and thecommunication apparatus 151. The CPU 103 may omit the processing of stepS522 to maintain the Bluetooth® Low Energy connection.

In step S523, the CPU 103 establishes a Wi-Fi connection between thecommunication apparatus 151 operating in AP mode 1 and the informationprocessing apparatus 101 by using the first connection informationobtained in step S520. Before establishing the Wi-Fi connection betweenthe communication apparatus 151 operating in AP mode 1 and theinformation processing apparatus 101, the CPU 103 stores the Wi-Fisettings of the information processing apparatus 101 prior to theestablishment of the Wi-Fi connection.

In step S524, the CPU 103 searches the Wi-Fi network established in stepS523 for the communication apparatus 151 by using the serial numberobtained in step S520. A specific search method in step S524 is similarto that in step S503, whereas the search target in step S524 is thecommunication apparatus 151 identified in step S510 (i.e., thecommunication apparatus 151 corresponding to the serial number obtainedin step S520). Instead of the serial number, other identificationinformation about the communication apparatus 151, such as the MACaddress, may be used for the search.

In step S525, the CPU 103 determines whether the communication apparatus151 identified in step S510 is found by the search in step S524. In acase where the CPU 103 determines that the communication apparatus 151identified in step S510 is found by the search in step S524 (YES in stepS525), the processing proceeds to step S526. In a case where the CPU 103determines that the communication apparatus 151 identified in step S510is not found by the search in step S524 (NO in step S525), theprocessing proceeds to step S529. An example of the case where thecommunication apparatus 151 identified in step S510 is unable to befound by the search in step S524 is when a network fault occurs.

In step S526, which is performed in a case where the CPU 103 determinesthat the communication apparatus 151 identified in step S510 is found bythe search in step S524 (YES in step S525), the CPU 103 registers thecommunication apparatus 151 identified in step S510 in the printingapplication. A specific method for registration in step S526 is similarto that in step S506.

In step S527, the CPU 103 transmits an instruction for stoppingoperation in AP mode 1 to the communication apparatus 151 identified instep S510 via the Wi-Fi connection. Receiving the instruction, thecommunication apparatus 151 stops operating in AP mode 1, and restoresthe Wi-Fi settings of the communication apparatus 151 to those beforethe operation in AP mode 1.

In step S528, the CPU 103 restores the Wi-Fi settings of the informationprocessing apparatus 101 to those before the establishment of the Wi-Ficonnection in step S523. Specifically, the CPU 103 restores thedestination of the Wi-Fi connection of the information processingapparatus 101 to that before the establishment of the Wi-Fi connectionin step S523 based on the information stored in step S523. If there hasbeen no Wi-Fi connection established before the processing of thepresent flowchart is performed, the CPU 103 simply disconnects the Wi-Ficonnection between the communication apparatus 151 and the informationprocessing apparatus 101.

In step S529, which is performed in a case where the CPU 103 determinesthat the communication apparatus 151 identified in step S510 is notfound by the search in step S524 (NO in step S525), the CPU 103transmits an instruction for stopping operation in AP mode 1 to thecommunication apparatus 151 identified in step S510 via the Wi-Ficonnection. Since the communication apparatus 151 is not found by thesearch in step S525, the instruction usually does not reach thecommunication apparatus 151. However, the instruction can be deliveredif the network failure is resolved and the Wi-Fi connection is restored.The instruction in step S529 is transmitted just in case.

In step S530, the CPU 103 restores the Wi-Fi settings of the informationprocessing apparatus 101 to those before the establishment of the Wi-Ficonnection in step S523. Details of this processing are similar to thoseof step S528.

In the above described manner, the communication apparatus 151 that isthe communication target is registered in the printing application. Thisenables the information processing apparatus 101 to transmit a job tothe communication apparatus 151 that is the communication targetafterward.

In the present exemplary embodiment, if there is a communicationapparatus 151 on the Wi-Fi network to which the information processingapparatus 101 belongs (YES in step S504), the information processingapparatus 101 registers the communication apparatus 151 in the printingapplication by using only Wi-Fi communication without using a Bluetooth®Low Energy communication. Meanwhile, in a case where there is nocommunication apparatus 151 on the Wi-Fi network to which theinformation processing apparatus 101 belongs (NO in step S504), theinformation processing apparatus 101 registers a communication apparatus151 in the printing application by Wi-Fi communication performed viaBluetooth® Low Energy communication.

With the above described configuration, the information processingapparatus 101 can quickly register the communication apparatus 151 inthe printing application in a case where there is a communicationapparatus 151 on the Wi-Fi network to which the information processingapparatus 101 belongs (YES in step S504). Even if there is nocommunication apparatus 151 on the Wi-Fi network to which theinformation processing apparatus 101 belongs (NO in step S504), theinformation processing apparatus 101 can register a communicationapparatus 151 in the printing application by using Bluetooth® LowEnergy.

FIG. 6 is a flowchart illustrating a processing procedure that thecommunication apparatus 151 performs in the registration processingaccording to the present exemplary embodiment. For example, theflowchart illustrated in FIG. 6 is implemented by the CPU 154 reading aprogram stored in the ROM 152 or an external storage device (notillustrated) included in the communication apparatus 151 into the RAM153 and executing the program. The processing illustrated in the presentflowchart is started in a state where the Bluetooth® Low Energy functionof the communication apparatus 151 is enabled. The Bluetooth® Low Energyfunction of the communication apparatus 151 is enabled, for example,based on power-on of the communication apparatus 151 in a state wherethe initial settings of the communication apparatus 151 have not beencompleted (product delivery state) or pressing of a predetermined buttonfor the Bluetooth® Low Energy function on the communication apparatus151. The processing illustrated in the present flowchart is processingin a case where the communication apparatus 151 and the informationprocessing apparatus 101 do not belong to the same Wi-Fi network.

In step S601, the CPU 154 starts to transmit Bluetooth® Low Energyadvertising information by using the short-range wireless communicationunit 157.

In step S602, the CPU 154 receives a response to the advertisinginformation transmitted in step S601 from the information processingapparatus 101, and thereby establishes a Bluetooth® Low Energyconnection between the information processing apparatus 101 and thecommunication apparatus 151.

In step S603, the CPU 154 communicates various types of information withthe information processing apparatus 101 via the Bluetooth® Low Energyconnection. Specifically, the CPU 154 transmits the information aboutthe state of the communication apparatus 151 and receives theinformation about the name of the information processing apparatus 101.

In step S604, the CPU 154 performs the pairing processing between thecommunication apparatus 151 and the information processing apparatus101. Details of the pairing processing are as described above. The CPU154 manages which apparatus is paired with the communication apparatus151 based on the information about the name of the informationprocessing apparatus 101 received in step S603.

In step S605, the CPU 154 communicates various types of information withthe information processing apparatus 101 via the Bluetooth® Low Energyconnection. Specifically, the CPU 154 transmits the first connectioninformation, the second connection information, and the identificationinformation about the communication apparatus 151.

In step S606, the CPU 154 operates the communication apparatus 151 in APmode 1 based on the instruction transmitted from the informationprocessing apparatus 101 in step S521. Before operating thecommunication apparatus 151 in AP mode 1, the CPU 154 stores the Wi-Fisettings of the communication apparatus 151.

In step S607, the CPU 154 disconnects the Bluetooth® Low Energyconnection between the information processing apparatus 101 and thecommunication apparatus 151. The CPU 154 may omit the processing of stepS607 to maintain the Bluetooth® Low Energy connection.

In step S608, the CPU 154 establishes a Wi-Fi connection between thecommunication apparatus 151 and the information processing apparatus 101based on the reception of the first connection information from theinformation processing apparatus 101.

In step S609, the CPU 154 responds to the search processing by theinformation processing apparatus 101.

In step S610, the CPU 154 transmits the information about thecapabilities of the communication apparatus 151 and the serial number ofthe communication apparatus 151 to the information processing apparatus101 via the Wi-Fi connection.

In step S611, the CPU 154 receives an instruction for stopping operationin AP mode 1 from the information processing apparatus 101 via the Wi-Ficonnection, and stops operation in AP mode 1. The Wi-Fi connectionbetween the communication apparatus 151 and the information processingapparatus 101 is thereby disconnected.

In step S612, the CPU 154 determines whether to start operation in APmode 2. Specifically, the CPU 154 determines whether an infrastructureconnection (connection with an AP) has been established using the 5-GHzfrequency band before the start of the operation in AP mode 1. If aninfrastructure connection has been established using the 5-GHz frequencyband before the start of the operation in AP mode 1, the CPU 154determines to not start operation in AP mode 2. If no infrastructureconnection has been established using the 5-GHz frequency band beforethe start of the operation in AP mode 1, the CPU 154 determines to startoperation in AP mode 2. Examples of the case where no infrastructureconnection has been established using the 5-GHz frequency band includewhere an infrastructure connection has been established using the2.4-GHz frequency band and where no infrastructure connection has beenestablished at all. In a case where the CPU 154 determines to startoperation in AP mode 2 (YES in step S612), the processing proceeds tostep S613. In a case where the CPU 154 determines to not start operationin AP mode 2 (NO in step S612), the processing proceeds to step S614.

In step S613, which is performed in a case where the CPU 154 determinesto start operation in AP mode 2 (YES in step S612), the CPU 154 restoresthe Wi-Fi settings of the communication apparatus 151 to those beforethe operation in AP mode 1 based on the information stored in step S606,and allows the communication apparatus 151 to start to operate in APmode 2. Specifically, for example, if the state of the communicationapparatus 151 before the operation in AP mode 1 is where aninfrastructure connection is established using the 2.4-GHz frequencyband, the CPU 154 initially reestablishes the infrastructure connectionusing the 2.4-GHz frequency band. The CPU 154 then starts simultaneousoperations by operating the communication apparatus 151 in AP mode 2using the 2.4-GHz frequency band. The processing of the presentflowchart ends. In the present exemplary embodiment, the CPU 154 usesnot the 5-GHz frequency band but the 2.4-GHz frequency band in AP mode 2started here, even if the state before the operation in AP mode 1 iswhere no infrastructure connection is established.

In step S614, which is performed in a case where the CPU 154 determinesto not start operation in AP mode 2 (NO in step S612), the CPU 154restores the Wi-Fi settings of the communication apparatus 151 to thosebefore the operation in AP mode 1 based on the information stored instep S606. In other words, the CPU 154 reestablishes the infrastructureconnection using the 5-GHz frequency band. Here, the CPU 154 does notallow the communication apparatus 151 to start operation in AP mode 2.The processing of the present flowchart ends.

The CPU 154 may perform the processing for restoring the Wi-Fi settingsof the communication apparatus 151 to those prior to the operation in APmode 1 before the determination of step S612, instead of in step S613 orS614.

The reason why the processing of steps S612 to S614 is performed will bedescribed.

In the present exemplary embodiment, the communication apparatus 151 canperform simultaneous operations. Simultaneous operations refer toperforming operations while maintaining an infrastructure connection anda direct connection simultaneously (in parallel). In simultaneousoperations, the communication apparatus 151 may be connected torespective different apparatuses by the direct connection and theinfrastructure connection. In other words, the communication apparatus151 can connect to a plurality of apparatuses in parallel bysimultaneous operations.

Communication by the infrastructure connection and communication by thedirect connection are performed by using specific frequency bands(specific channels). In each of the communications by the infrastructureconnection and the direct connection, the channel to be used for thecommunication and connection between the apparatuses is initiallydetermined before the communication is started. Concurrent allocation ofa plurality of channels to a wireless integrated circuit (IC) chip forcommunication complicates the configuration of the communicatingapparatuses and the processing to be performed by the apparatuses. Inperforming simultaneous operations, the communication apparatus 151therefore desirably uses the same channel for the communications in therespective modes. In other words, the communication apparatus 151desirably uses a single channel even during simultaneous operations. Inthe present exemplary embodiment, the communication unit 156 includesonly one wireless IC chip that implements communications on apredetermined channel. The communication apparatus 151 does notcommunicate by using a plurality of channels at a time.

If the communication apparatus 151 operates as a group owner or AP, thecommunication apparatus 151 serving as the master station can freelydetermine the channel to be used for direct connection. By contrast, thechannel to be used for infrastructure connection is determined by theapparatus serving as the master station in the infrastructureconnection, such as an external AP. In performing simultaneousoperations, the communication apparatus 151 therefore desirablydetermines the channel used for infrastructure connection, determined bythe external AP, to be the channel used for direct connection.

A function called dynamic frequency selection (DFS) to be describedbelow is applied to direct connections using specific channels amongthose corresponding to the 5-GHz frequency band. Depending on theapparatus configuration, the presence of the function can preclude thecommunication apparatus 151 from establishing a direct connection usinga channel corresponding to the 5-GHz frequency band, or make itundesirable for the communication apparatus 151 to establish a directconnection using a channel corresponding to the 5-GHz frequency band.Specifically, for example, the wireless IC chip included in thecommunication unit 156 can be unable or undesirable to operate as agroup owner or AP (i.e., master station) using a channel correspondingto the 5-GHz frequency band. DFS will now be described.

An apparatus operating as a group owner or AP, and a master station suchas an external AP, execute DFS during communication using a specificfrequency band such as the 5-GHz frequency band. DFS is a technique forcontrolling communication between apparatuses to not affect weatherradars. If a specific apparatus such as a weather radar uses a certainfrequency, interference waves occur at the certain frequency. The DFStechnique switches the frequency (channel) used by the master stationwithin a specific frequency band including the certain frequency.Specifically, if interference waves are detected at the frequency thatthe master station is using, the master station initially suspendscommunication in the specific frequency band for a predetermined time(for example, one minute). While the communication is suspended, thecommunication apparatus 151 checks whether a new channel is availableafter the suspension of the communication is cancelled (whether thefrequency corresponding to the channel is used by a specific apparatussuch as a weather radar). If the channel is confirmed to be available,the master station cancels the suspension of the communication andresumes communication on the new channel. Detection of interferencewaves by a master station at the frequency the master station uses forcommunication means that the master station detects that the frequencythe master station is using for communication is used by a specificapparatus such as a weather radar. A technique called transmit powercontrol (TPC) is a technique similar to DFS.

If the communication channel in use is detected to be used by a specificapparatus such as a weather radar, it is the master station in thecommunication system that controls switching of the communicationchannel in use. The slave station follows the processing if thecommunication channel in use is switched by the master station.Specifically, in the infrastructure connection using the 5-GHz frequencyband, if the external AP switches channels by DFS, the communicationapparatus 151 follows to switch the channels. DFS and TPC apply tocommunication in a specific frequency band such as the 5-GHz frequencyband and not to communication in frequency bands such as 2.4-GHzfrequency band. The communication apparatus 151 will not switch thechannel used for communication in the 2.4-GHz frequency band based onthe communication condition of a specific apparatus such as a weatherradar. The reason is that specific apparatuses such as a weather radarcommunicate using the 5-GHz frequency band and not the 2.4-GHz frequencyband. That is, DFS or TPC channel switching occurs when the apparatusescommunicate using the 5-GHz frequency band. As described above, DFSchannel switching occurs between channels corresponding to the 5-GHzfrequency band.

Some wireless IC chips support DFS and some do not. If the wireless ICchip used in the communication apparatus 151 does not support DFS, thecommunication apparatus 151 is unable to switch the used communicationchannel by DFS when operating as a master station. The communicationapparatus 151 using the wireless IC chip not supporting DFS is thusincapable of 5-GHz direct connection. As described above, insimultaneous operations, an infrastructure connection and a directconnection share the same channel. The communication apparatus 151 usingthe wireless IC chip not supporting DFS (communication apparatus 151incapable of 5-GHz direct connection) is therefore unable to performsimultaneous operations if the 5-GHz frequency band is used for theinfrastructure connection.

Even if the communication apparatus 151 uses a wireless IC chipsupporting DFS (capable of 5-GHz direct connection), there is thefollowing issue. As described above, the channel used for the directconnection can be changed by DFS. Meanwhile, as described above, theinfrastructure connection and the direct connection share the samechannel in simultaneous operations. In addition, the channel used forthe infrastructure connection is unable to be determined by thecommunication apparatus 151. In other words, if the channel used for thedirect connection is changed by DFS during simultaneous operations, thechannel used for the infrastructure connection is unable to be changedby the communication apparatus 151. As a result, the infrastructureconnection and the direct connection can no longer be maintained inparallel since the infrastructure connection and the direct connectioncan no longer share the same channel.

Under the circumstances, in the present exemplary embodiment, thecommunication apparatus 151 will not be operated in AP mode 2 (in astate capable of direct connection) if the state of the communicationapparatus 151 before the operation in AP mode 1 is where theinfrastructure connection using the 5-GHz frequency band is established.This prevents a direct connection using the 5-GHz frequency band frombeing established in a state where an infrastructure connection usingthe 5-GHz frequency band is established.

With such a configuration, the communication apparatus 151, even in anenvironment where the communication apparatus 151 is unable to beregistered in the printing application by using only Wi-Ficommunication, can be registered in the printing application byperforming Bluetooth® Low Energy communication and then performing Wi-Ficommunication. In the present exemplary embodiment, the communicationapparatus 151 automatically operates itself in AP mode 2 based on thestop of the operation in AP mode 1. After the registration processing iscompleted, the communication apparatus 151 continues operating in APmode 2. The information processing apparatus 101 can thus establish adirect connection between the information processing apparatus 101 andthe communication apparatus 151 at any timing afterward. In other words,in job transmission processing, the information processing apparatus 101can transmit a job to the communication apparatus 151 by using onlyWi-Fi communications without using the Bluetooth® Low Energycommunication.

In the foregoing description, a direct connection using the 5-GHzfrequency band is controlled to not be established in a state where aninfrastructure connection using the 5-GHz frequency band is established.However, this is not restrictive. The 5-GHz frequency band includesfrequency bands to which DFS (or TPC) is applied and ones to which DFS(or TPC) is not applied. For example, simultaneous operations may becontrolled to not be performed in a state where an infrastructureconnection using a DFS-applied frequency band in the 5-GHz frequencyband is established. Specifically, for example, in step S612, the CPU154 may determine whether an infrastructure connection (connection withan AP) has been established by using a DFS-applied frequency band in the5-GHz frequency band before the operation in AP mode 2 is started.

Moreover, for example, even if the state of the communication apparatus151 before the operation in AP mode 2 is where an infrastructureconnection using the 5-GHz frequency band is established, thecommunication apparatus 151 may operate in a state capable of directconnection. Specifically, for example, to give higher priority tooperating the communication apparatus 151 in a state capable of directconnection, the communication apparatus 151 may remain unrestored to itsstate before the operation in AP mode 2.

<Processing for Transmitting Print Job to Communication Apparatus 151>

FIG. 7 is a flowchart illustrating a procedure of job transmissionprocessing performed by the information processing apparatus 101according to the present exemplary embodiment. For example, theflowchart illustrated in FIG. 7 is implemented by the CPU 103 readingthe printing application stored in the ROM 104 or the external storagedevice 106 into the RAM 105 and executing the printing application. Theflowchart illustrated in FIG. 7 is started after the completion of theregistration processing of the communication apparatus 151 and in astate where the printing application is running.

In step S701, the CPU 103 accepts selection of image data to be printedfrom the user on an image data selection screen illustrated in FIG. 9.

In step S702, the CPU 103 accepts pressing of a print button displayedby the printing application from the user. The print button may bedisplayed on the image data selection screen illustrated in FIG. 9. Theprint button may be displayed on a screen illustrated in FIG. 10, whichis displayed after the selection of the image data and displays theselected image data. The print button may be displayed on both thescreens.

In step S703, the CPU 103 searches the Wi-Fi network to which theinformation processing apparatus 101 belongs for the communicationapparatus 151 registered in the printing application by using the serialnumber obtained during the registration processing. As described above,the Wi-Fi network to which the information processing apparatus 101belongs refers to the network formed by the external AP that theinformation processing apparatus 101 is in Wi-Fi connection with. Inother words, for example, the communication apparatus 151 registered inthe printing application is searched for from among apparatuses in Wi-Ficonnection with the external AP that the information processingapparatus 101 is in Wi-Fi connection with. The search may be performedby using other identification information about the communicationapparatus 151, such as a MAC address and a Bonjour name, instead of theserial number. The search may use identification information obtained byBluetooth® Low Energy in step S512, or identification informationobtained by Wi-Fi in step S526.

In step S704, the CPU 103 determines whether the communication apparatus151 registered in the printing application is found by the search instep S703. The determination in this determination processingcorresponds to a determination whether the communication apparatus 151registered in the printing application is connected to the external APthat the information processing apparatus 101 is in Wi-Fi connectionwith. In a case where the CPU 103 determines that the communicationapparatus 151 registered in the printing application is found by thesearch in step S703 (YES in step S704), the processing proceeds to stepS705. In a case where the CPU 103 determines that the communicationapparatus 151 registered in the printing application is not found by thesearch in step S703 (NO in step S704), the processing proceeds to stepS706.

In step S705, which is performed in a case where the CPU 103 determinesthat the communication apparatus 151 registered in the printingapplication is found by the search in step S703 (YES in step S704), theCPU 103 transmits a print job to the communication apparatus 151registered in the printing application via the Wi-Fi network to whichthe information processing apparatus 101 belongs. The print jobtransmitted by the CPU 103 is a job for causing the communicationapparatus 151 to print the image data selected in step S701. Theprocessing of the present flowchart ends.

In step S706, which is performed in a case where the CPU 103 determinesthat the communication apparatus 151 registered in the printingapplication is not found by the search in step S703 (NO in step S704),the CPU 103 determines whether the communication apparatus 151 isregistered in the printing application by the registration processing(processing after the determination of NO in step S504) using Bluetooth®Low Energy. In a case where the CPU 103 determines that thecommunication apparatus 151 is registered in the printing application bythe registration processing (YES in step S706), the processing proceedsto step S707. In a case where the CPU 103 determines that thecommunication apparatus 151 is not registered in the printingapplication by the registration processing (NO in step S706), theprocessing of the present flowchart ends.

In step S707, the CPU 103 executes attempting processing for attemptingto establish a Wi-Fi connection between the communication apparatus 151that is registered in the printing application and operating in AP mode2 and the information processing apparatus 101 by using the secondconnection information obtained in step S520. Before executing theattempting processing, the CPU 103 stores the Wi-Fi settings of theinformation processing apparatus 101 prior to the execution of theattempting processing. In the present exemplary embodiment, if theinformation about the capabilities is obtained via a Wi-Fi connectionestablished by Bluetooth® Low Energy communication, the CPU 103 thusexecutes the attempting processing. Meanwhile, if the information aboutthe capabilities is obtained via a Wi-Fi connection established withoutBluetooth® Low Energy communication, the CPU 103 does not execute theattempting processing. The reason is that if the CPU 103 obtains theinformation about the capabilities via the Wi-Fi connection establishedwithout Bluetooth® Low Energy communication, neither the firstconnection information nor the second connection information isobtained. Examples of the case where the information about thecapabilities is obtained via the Wi-Fi connection established withoutBluetooth® Low Energy communication include where the communicationapparatus 151 is registered in step S506. In the foregoing description,the attempting processing is executed by using the second connectioninformation obtained in step S520. However, this is not restrictive. Forexample, the attempting processing may be executed by using secondconnection information obtained from the communication apparatus 151 atdifferent timing or executed by using second connection informationmanually input to the information processing apparatus 101 by the user.

In step S708, the CPU 103 determines whether the connection issuccessfully established in step S707. In a case where the CPU 103determines that the connection is successfully established in step S707(YES in step S708), the processing proceeds to step S709. In a casewhere the CPU 103 determines that the connection is not successfullyestablished in step S707 (NO in step S708), the processing proceeds tostep S712. Examples of the case where the connection fails to beestablished despite the execution of the registration processingillustrated in FIGS. 5 and 6 will be described. An example is where thecommunication apparatus 151 establishes an infrastructure connectionusing the 5-GHz frequency band and does not start to operate in AP mode2 (NO in step S612). Another example is where the communicationapparatus 151 starts to operate in AP mode 2 by the processing of stepS613 and then stops operating in AP mode 2 based on user operations onthe communication apparatus 151.

In step S709, in a case where the CPU 103 determines that the connectionis successfully established in step S707 (YES in step S708), the CPU 103transmits the print job for printing the image data selected in stepS701 to the communication apparatus 151 that is registered in theprinting application and operating in AP mode 2 via the Wi-Ficonnection.

In step S710, the CPU 103 disconnects the Wi-Fi connection between thecommunication apparatus 151 that is registered in the printingapplication and operating in AP mode 2 and the information processingapparatus 101.

In step S711, the CPU 103 restores the Wi-Fi settings of the informationprocessing apparatus 101 to those before the execution of the attemptingprocessing based on the information stored in step S707. The processingof the present flowchart ends. In step S712, which is performed in acase where the CPU 103 determines that the connection is notsuccessfully established in step S707 (NO in step S708), the CPU 103attempts to establish a Bluetooth® Low Energy connection between thecommunication apparatus 151 registered in the printing application andthe information processing apparatus 101 by using the advertisinginformation obtained in step S509. Specifically, the CPU 103 starts toreceive advertising information, and attempts to identify theadvertising information obtained in step S509 in the receivedadvertising information. If the advertising information obtained in stepS509 is successfully identified, the CPU 103 successfully establishes aBluetooth® Low Energy connection by transmitting a response to theidentified advertising information.

In step S713, the CPU 103 determines whether the connection issuccessfully established in step S712. In a case where the CPU 103determines that the connection is successfully established in step S712(YES in step S713), the processing proceeds to step S714. In a casewhere the CPU 103 determines that the connection is not successfullyestablished in step S712 (NO in step S713), the processing of thepresent flowchart ends.

In step S714, which is performed in a case where the CPU 103 determinesthat the connection is successfully established in step S712 (YES instep S713), the CPU 103 transmits an instruction for operating thecommunication apparatus 151 in AP mode 1 (instruction to enter AP mode1) to the communication apparatus 151 via the Bluetooth® Low Energyconnection. The communication apparatus 151 thereby starts to operate inAP mode 1.

In step S715, the CPU 103 disconnects the Bluetooth® Low Energyconnection between the communication apparatus 151 and the informationprocessing apparatus 101. Before disconnecting the Bluetooth® Low Energyconnection, the CPU 103 may obtain the first connection information fromthe communication apparatus 151 via the Bluetooth® Low Energyconnection. The CPU 103 may omit the processing of step S715 to maintainthe Bluetooth® Low Energy connection.

In step S716, the CPU 103 establishes a Wi-Fi connection between thecommunication apparatus 151 operating in AP mode 1 and the informationprocessing apparatus 101 by using the first connection informationobtained in step S520 or S715. Before establishing the Wi-Fi connectionbetween the communication apparatus 151 operating in AP mode 1 and theinformation processing apparatus 101, the CPU 103 stores the Wi-Fisettings of the information processing apparatus 101 prior to theestablishment of the Wi-Fi connection. Examples of the Wi-Fi settings ofthe information processing apparatus 101 include a setting about theWi-Fi connection state of the information processing apparatus 101.

In step S717, the CPU 103 transmits the print job for printing the imagedata selected in step S701 to the communication apparatus 151 operatingin AP mode 1 via the Wi-Fi connection.

In step S718, the CPU 103 transmits an instruction for stoppingoperation in AP mode 1 to the communication apparatus 151 operating inAP mode 1 via the Wi-Fi connection. Receiving the instruction, thecommunication apparatus 151 stops operating in AP mode 1, and restoresthe Wi-Fi settings of the communication apparatus 151 to those beforethe operation in AP mode 1.

In step S719, the CPU 103 restores the Wi-Fi settings of the informationprocessing apparatus 101 to those before the establishment of the Wi-Ficonnection between the communication apparatus 151 operating in AP mode1 and the information processing apparatus 101 based on the informationstored in step S716. The processing of the present flowchart ends.

As described above, in the present exemplary embodiment, if a jobtransmission instruction is accepted, the information processingapparatus 101 does not immediately attempt a handover but attempts amethod for transmitting the job without a handover. Specifically, if ajob transmission instruction is accepted, the information processingapparatus 101 attempts to establish a Wi-Fi connection between thecommunication apparatus 151 that is registered in the printingapplication and operating in AP mode 2 and the information processingapparatus 101 before performing a handover. If the job transmissioninstruction is accepted, the information processing apparatus 101 alsodetermines the presence or absence of the communication apparatus 151registered in the printing application on the Wi-Fi network to which theinformation processing apparatus 101 belongs before performing ahandover.

More specifically, in the present exemplary embodiment, the informationprocessing apparatus 101, if in a state where a job can be transmittedwithout a handover, quickly transmits the job by performing only Wi-Ficommunication without performing a handover (i.e., without usingBluetooth® Low Energy communication). Meanwhile, if in a state where ajob can only be transmitted after a handover, the information processingapparatus 101 transmits the job by performing a handover (i.e., by usingBluetooth® Low Energy communication). In such a manner, if theinformation processing apparatus 101 according to the present exemplaryembodiment is instructed to transmit a job by the user, the informationprocessing apparatus 101 appropriately controls whether to transmit thejob by performing Bluetooth® Low Energy communication and thenperforming Wi-Fi communication or transmit the job by performing onlyWi-Fi communication without Bluetooth® Low Energy communication. Inother words, in the configuration where a job is transmitted by ahandover, the information processing apparatus 101 according to thepresent exemplary embodiment can transmit the job more appropriately.

In the foregoing description, a print job for causing the communicationapparatus 151 to perform printing is transmitted. However, this is notrestrictive. For example, a scan job for causing the communicationapparatus 151 to perform scanning may be transmitted. In such a case,the CPU 103 receives scan data obtained by the communication apparatus151 performing scanning via the Wi-Fi connection, and then restores theWi-Fi settings of the information processing apparatus 101.

In the foregoing description, in a case where a job transmissioninstruction from the user is accepted in step S702, the informationprocessing apparatus 101 performs the search processing in step S703 andthen performs the attempting processing in step S707. However, this isnot restrictive. For example, in a case where a job transmissioninstruction from the user is accepted in step S702, the informationprocessing apparatus 101 may perform the attempting processing of stepS707 before performing the search processing of step S703. In such aconfiguration, the information processing apparatus 101 performs thesearch processing of step S703 in a case where the attempting processingof step S707 fails. In a case where the communication apparatus 151 isnot found by the search processing in step S703, the informationprocessing apparatus 101 then performs a handover that is the processingof step S712 and the subsequent steps. Alternatively, for example, theinformation processing apparatus 101 may omit the search processing ofstep S703. In such a configuration, in a case where a job transmissioninstruction from the user is accepted in step S702, the informationprocessing apparatus 101 performs the attempting processing of step S707without the search processing of step S703. In a case where theattempting processing of step S707 fails, the information processingapparatus 101 performs a handover that is the processing of step S712and the subsequent steps, without the search processing in step S703.

FIG. 8 is a flowchart illustrating a procedure of print processingperformed by the communication apparatus 151 according to the presentexemplary embodiment. For example, the flowchart illustrated in FIG. 8is implemented by the CPU 154 reading a program stored in the ROM 152 orthe external storage device (not illustrated) included in thecommunication apparatus 151 into the RAM 153 and executing the program.The processing illustrated in the present flowchart is started in astate where the Bluetooth® Low Energy function of the communicationapparatus 151 is enabled. The processing illustrated in the presentflowchart is print processing in a case where the communicationapparatus 151 and the information processing apparatus 101 do not belongto the same Wi-Fi network and the communication apparatus 151 is notoperating in AP mode 2.

In step S801, the CPU 154 establishes a Bluetooth® Low Energy connectionbetween the information processing apparatus 101 and the communicationapparatus 151 by receiving a response to the advertising informationtransmitted by the communication apparatus 151 from the informationprocessing apparatus 101.

In step S802, the CPU 154 operates the communication apparatus 151 in APmode 1 based on the instruction transmitted from the informationprocessing apparatus 101 in step S714.

In step S803, the CPU 154 disconnects the Bluetooth® Low Energyconnection between the information processing apparatus 101 and thecommunication apparatus 151. The CPU 154 may omit the processing of stepS803 to maintain the Bluetooth® Low Energy connection.

In step S804, the CPU 154 establishes a Wi-Fi connection between thecommunication apparatus 151 and the information processing apparatus 101based on reception of the first connection information from theinformation processing apparatus 101.

In step S805, the CPU 154 performs printing based on the print jobtransmitted from the information processing apparatus 101 in step S717.

In step S806, the CPU 154 stops operating in AP mode 1 by receiving aninstruction for stopping operation in AP mode 1 from the informationprocessing apparatus 101 via the Wi-Fi connection. The Wi-Fi connectionbetween the communication apparatus 151 and the information processingapparatus 101 is thereby disconnected. The processing of step S806 andthe subsequent steps may be performed after the communication apparatus151 receives the print job from the information processing apparatus101, e.g., before the completion of the printing based on the print job.

In step S807, the CPU 154 determines whether to start operation in APmode 2. Details of this processing are similar to those of step S612. Ina case where the CPU 154 determines that operation is started in AP mode2 (YES in step S807), the processing proceeds to step S808. In a casewhere the CPU 154 determines that operation is not started in AP mode 2(NO in step S807), the processing proceeds to step S809.

In step S808, which is performed in a case where the CPU 154 determinesthat operation is started in AP mode 2 (YES in step S807), the CPU 154restores the Wi-Fi settings of the communication apparatus 151 to thosebefore the operation in AP mode 1, and causes the communicationapparatus 151 to start operation in AP mode 2 using the 2.4-GHzfrequency band.

In step S809, which is performed in a case where the CPU 154 determinesthat operation is not started in AP mode 2 (NO in step S807), the CPU154 restores the Wi-Fi settings of the communication apparatus 151 tothose before the operation in AP mode 1. In other words, the CPU 154reestablishes the infrastructure connection using the 5-GHz frequencyband. Here, the CPU 154 does not allow the communication apparatus 151to start operation in AP mode 2. The processing of the present flowchartends.

With the foregoing configuration, the communication apparatus 151 canreceive the job from the information processing apparatus 101 byperforming Bluetooth® Low Energy communication and then performing Wi-Ficommunication, even in an environment where a job is unable to bereceived from the information processing apparatus 101 by using onlyWi-Fi communication. After the reception of the job from the informationprocessing apparatus 101, the communication apparatus 151 automaticallyoperates itself in AP mode 1. The communication apparatus 151 canthereby construct an environment where a job can be received from theinformation processing apparatus 101 by using only Wi-Fi communication.In other words, on the next job transmission, the information processingapparatus 101 can transmit a job to the communication apparatus 151 byusing only Wi-Fi communication without using Bluetooth® Low Energycommunication.

For example, simultaneous controls may be controlled to not be performedin a state where an infrastructure connection is established using aDFS-applied frequency band in the 5-GHz frequency band. Specifically,for example, the CPU 154 may determine in step S807 whether aninfrastructure connection (connection with an AP) using a DFS-appliedfrequency band in the 5-GHz frequency band is established beforestarting operation in AP mode 2.

In addition, for example, if the state of the communication apparatus151 before operation in AP mode 2 is where an infrastructure connectionusing the 5-GHz frequency band is established, the communicationapparatus 151 may be operated in a state capable of direct connection.Specifically, for example, to give higher priority to the operation ofthe communication apparatus 151 in the state capable of directconnection, the communication apparatus 151 may be left unrestored tothe state of the communication apparatus 151 before the operation in APmode 2.

Other Embodiments

An exemplary embodiment of the present invention may be implemented byprocessing for supplying a program for implementing one or morefunctions of the foregoing exemplary embodiment to a system or anapparatus via a network or a storage medium, and reading and executingthe program by one or more processors of a computer in the system orapparatus. A circuit for implementing one or more functions (forexample, application specific integrated circuit (ASIC)) may be used forimplementation.

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2019-016167, filed Jan. 31, 2019, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A control method of an information processingapparatus capable of communicating using a first communication methodand communicating using a second communication method, the controlmethod comprising: accepting a communication instruction forpredetermined data from a user; after the communication instruction isaccepted, performing attempting processing for attempting to establish aconnection with a communication apparatus using the first communicationmethod; in a case where the attempting processing successfullyestablishes the connection with the communication apparatus using thefirst communication method, communicating the predetermined data withthe communication apparatus via a connection with the communicationapparatus using the first communication method without communicationwith the communication apparatus by the second communication method, thecommunication being used to establish the connection with thecommunication apparatus using the first communication method; and in acase where the attempting processing fails to establish the connectionwith the communication apparatus using the first communication method,performing the communication with the communication apparatus by thesecond communication method and communicating the predetermined datawith the communication apparatus via the connection with thecommunication apparatus using the first communication method, thecommunication being used to establish the connection with thecommunication apparatus using the first communication method.
 2. Thecontrol method according to claim 1, further comprising obtainingpredetermined connection information for establishing the connectionwith the communication apparatus using the first communication method,wherein the attempting processing is performed by using thepredetermined connection information.
 3. The control method according toclaim 2, wherein the predetermined connection information is obtainedfrom the communication apparatus by the second communication methodbefore the communication instruction is accepted.
 4. The control methodaccording to claim 2, further comprising: performing predeterminedcommunication by the second communication method before thecommunication instruction is accepted, the predetermined communicationbeing used to establish the connection with the communication apparatususing the first communication method; and obtaining information about acapability of the communication apparatus via the connection with thecommunication apparatus using the first communication method before thecommunication instruction is accepted, the connection being establishedby the predetermined communication.
 5. The control method according toclaim 4, wherein the predetermined connection information is obtainedfrom the communication apparatus by the predetermined communication. 6.The control method according to claim 4, wherein the predeterminedconnection information is obtained from the communication apparatus viathe connection with the communication apparatus using the firstcommunication method, the connection being established by thepredetermined communication.
 7. The control method according to claim 4,wherein other connection information different from the predeterminedconnection information is obtained from the communication apparatus bythe predetermined communication, the other connection information beingused to establish the connection with the communication apparatus usingthe first communication method, and wherein the information about thecapability of the communication apparatus is obtained via the connectionwith the communication apparatus using the first communication method,the connection being established by using the other connectioninformation.
 8. The control method according to claim 7, wherein in acase where the attempting processing fails to establish the connectionwith the communication apparatus using the first communication method,the communication used to establish the connection with thecommunication apparatus using the first communication method isperformed with the communication apparatus by the second communicationmethod, and then the connection with the communication apparatus usingthe first communication method is established by using the otherconnection information.
 9. The control method according to claim 4,further comprising after the information about the capability of thecommunication apparatus is obtained via the connection with thecommunication apparatus using the first communication method, performingprocessing for restoring a state of connection of the informationprocessing apparatus using the first communication method to a statebefore the connection with the communication apparatus using the firstcommunication method is established.
 10. The control method according toclaim 4, wherein in a case where the information about the capability ofthe communication apparatus is obtained via the connection with thecommunication apparatus using the first communication method, theconnection being established without the predetermined communication,the attempting processing is not performed despite acceptance of thecommunication instruction, and wherein in a case where the informationabout the capability of the communication apparatus is obtained via theconnection with the communication apparatus using the firstcommunication method, the connection being established by thepredetermined communication, the attempting processing is performedafter the communication instruction is accepted.
 11. The control methodaccording to claim 1, wherein in a case where the attempting processingfails to establish the connection with the communication apparatus usingthe first communication method, connection information for establishingthe connection with the communication apparatus using the firstcommunication method is received as the communication used to establishthe connection with the communication apparatus using the firstcommunication method.
 12. The control method according to claim 1,wherein in a case where the attempting processing fails to establish theconnection with the communication apparatus using the firstcommunication method, a shift instruction for shifting the communicationapparatus into a state capable of establishing a connection using thefirst communication method is transmitted as the communication used toestablish the connection with the communication apparatus using thefirst communication method.
 13. The control method according to claim 1,further comprising after the communication instruction is accepted,performing search processing for searching a network to which theinformation processing apparatus belongs for the communicationapparatus, wherein in a case where the communication apparatus is foundby the search processing, the predetermined data is communicated withthe communication apparatus via the network without communicating withthe communication apparatus using the second communication method. 14.The control method according to claim 13, wherein in a case where thecommunication apparatus is found by the search processing, thepredetermined data is communicated with the communication apparatus viathe network without the attempting processing or communicating with thecommunication apparatus using the second communication method, andwherein in a case where the communication apparatus is not found by thesearch processing, the attempting processing is performed.
 15. Thecontrol method according to claim 13, further comprising obtainingidentification information about the communication apparatus before thecommunication instruction is accepted, wherein the search processing isperformed based on the identification information.
 16. The controlmethod according to claim 15, wherein the identification information isany one of a serial number of the communication apparatus, a mediaaccess control (MAC) address of the communication apparatus, and aBonjour name of the communication apparatus.
 17. The control methodaccording to claim 1, further comprising performing authenticationprocessing between the communication apparatus and the informationprocessing apparatus by using the second communication method before thecommunication instruction is accepted, wherein the communicationapparatus and the information processing apparatus generate the sameauthentication information by the authentication processing, and whereinafter the authentication processing is performed, communication usingthe second communication method between the communication apparatus andthe information processing apparatus is performed based on theauthentication information.
 18. The control method according to claim 1,further comprising after the predetermined data is communicated with thecommunication apparatus via the connection with the communicationapparatus using the first communication method, performing processingfor restoring a state of connection of the information processingapparatus using the first communication method to a state before theconnection with the communication apparatus using the firstcommunication method is established.
 19. The control method according toclaim 1, wherein the first communication method is Wireless Fidelity(Wi-Fi).
 20. The control method according to claim 1, wherein the secondcommunication method is Bluetooth®.
 21. The control method according toclaim 20, wherein the second communication method is Bluetooth® LowEnergy.
 22. The control method according to claim 1, wherein thepredetermined data is a print job for causing the communicationapparatus to perform printing or a scan job for causing thecommunication apparatus to perform scanning.
 23. The control methodaccording to claim 1, wherein the connection established by theattempting processing is a connection with the communication apparatususing the first communication method without using an externalapparatus, the external apparatus being an apparatus outside thecommunication apparatus and outside the information processingapparatus.
 24. An information processing apparatus capable ofcommunicating using a first communication method and communicating usinga second communication method, the information processing apparatuscomprising: an acceptance unit configured to accept a communicationinstruction for predetermined data from a user; an attempt unitconfigured to, after the communication instruction is accepted, performattempting processing for attempting to establish a connection with thecommunication apparatus using the first communication method; and acommunication unit configured to, in a case where the attemptingprocessing successfully establishes the connection with thecommunication apparatus using the first communication method,communicate the predetermined data with the communication apparatus viathe connection with the communication apparatus using the firstcommunication method without communication with the communicationapparatus by the second communication method, the communication beingused to establish the connection with the communication apparatus usingthe first communication method, and in a case where the attemptingprocessing fails to establish the connection with the communicationapparatus using the first communication method, perform thecommunication with the communication apparatus by the secondcommunication method and communicate the predetermined data with thecommunication apparatus via the connection with the communicationapparatus using the first communication method, the communication beingused to establish the connection with the communication apparatus usingthe first communication method.